import { $get, $put } from '@js/request'
import { DocumentSchema } from '@src/components/schema/document'

export async function getDocListRequest (caseid: string, current: number, pageSize: number): Promise<{ list: DocumentSchema[], total: number }> {
  const condition = [
    { k: 'sign_type', o: 'not null' }
  ]
  const res = await $get(`/api/commission/document/${caseid}`, {
    condition: JSON.stringify(condition),
    page: current,
    limit: pageSize
  })
  return res.data
}

export async function delRequest (id: string) {
  const res = await $put(`/api/commission/document/cancelSerialno/${id}`, { status: 0 })
  return res.data
}
